const path = require('path')

module.exports = {
  devServer: {
    port: 10200,
    disableHostCheck: true,
    headers: {
      'Access-Control-Allow-Origin': '*',
    },
    // proxy: {
    //   '/api': {
    //     target: 'http://dev-api.jt-gmall.com',
    //     changeOrigin: true,
    //     pathRewrite: {
    //       '^/api': ''
    //     }
    //   }
    // }
  },
  configureWebpack: {
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src'),
      }
    },
    output: {
      library: 'SassMicroApp',
      libraryTarget: 'umd',
      jsonpFunction: 'webapckJsonp_SassMicroApp',
    }
  }
}